#include <stdio.h>

void multiply(int *a, int n)
{
	int c = 0, i=0;
	while (*a != -1 && i < 10) {
		c = *a *n +c;
		*a = c%10;
		c /=10;
		a++;
		i++;
	}
	while (c && i<10) {
		*a = c%10;
		a++;
		c /=10;
		i++;
	}
	*a = -1;
}

int main()
{
	int i = 1, a[11]={0};
	a[0]=3; a[1]=3; a[2]=4; a[3]=8; a[4]=2;
	for (; i<=7830457; i++) {
		multiply(a, 2);
	}
	i=9;
	while(i >=0)printf("%d",a[i--]);
	printf("\n");
}
